/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Classes;

import java.util.Objects;

/**
 * Représente un produit
 * @author ZwoRmi
 */

public class Produit {
    
    private String _description;
    private double _prix;
    /**
     * Constructors
     */
    public Produit(){}

    public Produit(String description,double prix){
        this.setDescription(description);
        this.setPrix(prix);
    }
    
    /**
     * Getters and Setters
     * @return 
     */
    public String getDescription() {
        return _description;
    }

    public void setDescription(String description) {
        this._description = description;
    }

    public double getPrix() {
        return _prix;
    }

    public void setPrix(double prix) {
        this._prix = prix;
    }

    /**
     * Equals
     * @param obj
     * @return true si equals 
     */
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Produit other = (Produit) obj;
        if (!Objects.equals(this._description, other._description)) {
            return false;
        }
        if (this._prix != other._prix) {
            return false;
        }
        return true;
    }

    
    
}
